{% extends "temple.html" %}
{% block user %}
class="active"
{% endblock %}
{% block connet %}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <h1 class="page-header">用户表</h1>
            <div class="table-responsive">
                    <table border="1" class="table table-striped table-bordered table-hover">
                    <a href="{% url "user_add" %}" class="btn btn-success" role="button">添加</a>
                        <thead>
                        <tr id="{{ i.pk}}">
                            <th>用户名</th>
                            <th>手机号</th>
                            <th>姓名</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                         {% for i in obj %}
                            <tr id="{{ i.pk }}">
                                <td>{{ i.user}}</td>
                                <td>{{ i.phone }}</td>
                                <td>{{ i.u_name }}</td>
                                <td><button class="btn-danger btn del" id="{{ forloop.counter0  }}" name="{{ i }}">删除</button>
                                    <a href="{% url "user_alter" i.pk %}" class="btn btn-primary">修改</a>
                                </td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
            </div>
        </div>
{% endblock %}
